<h1 matDialogTitle>
  {{ 'Restore Cloud Sync Task' | translate }}
</h1>
<form class="ix-form-container" [formGroup]="form" (submit)="onSubmit()">
  <ix-input
    formControlName="description"
    [label]="'Description' | translate"
    [required]="true"
  ></ix-input>

  <ix-select
    formControlName="transfer_mode"
    [label]="'Transfer Mode' | translate"
    [required]="true"
    [options]="transferModes$"
  ></ix-select>

  <ix-transfer-mode-explanation
    [mode]="form.controls.transfer_mode.value"
  ></ix-transfer-mode-explanation>

  <ix-explorer
    formControlName="path"
    [label]="'Directory/Files' | translate"
    [required]="true"
    [tooltip]="helptext.pathTooltip | translate"
    [nodeProvider]="treeNodeProvider"
  ></ix-explorer>

  <ix-form-actions>
    <button mat-button type="button" matDialogClose ixTest="cancel">
      {{ 'Cancel' | translate }}
    </button>

    <button
      *ixRequiresRoles="requiredRoles"
      mat-button
      color="primary"
      type="submit"
      ixTest="restore"
      [disabled]="form.invalid"
    >
      {{ 'Restore' | translate }}
    </button>
  </ix-form-actions>
</form>
